home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / castools.zip / FUNCAH.ASM < prev    next >
Assembly Source File  |  1990-01-05  |  2KB  |  47 lines

  1. Include multi.inc
  2. Include model.inc
  3.  
  4. ;==============================================================================
  5. ;
  6. ;   CAS function Ah -- Get Event Date
  7. ;
  8. ;   Format:
  9. ;               int CASGetEventDate (int handle, BYTE queue, CAS_DATE *date)
  10. ;   Input:
  11. ;               handle of event, queue for event, pointer to date structure
  12. ;   Output:
  13. ;               Returns 0 if successful or negative error code, fills
  14. ;               date structure.
  15. ;==============================================================================
  16.  
  17.                 .CODE
  18. CASGetEventDate         PROC    arg1:WORD, arg2:BYTE, arg3:PTR WORD
  19.  
  20.                 mov     ax,MUX          ; load multiplex number
  21.                 mov     ah,al           ; move into ah
  22.                 mov     al,0Ah          ; CAS function A
  23.                 mov     bx,arg1         ; event handle
  24.                 mov     dl,arg2         ; queue
  25.                 int     2Fh
  26.  
  27.                 cmp     ax,0            ; ax = 0?
  28.                 jne     FINISH          ; get event date failed, return ax
  29.         IF      @DataSize               ; large and medium models
  30.                 les     di,arg3         ; pointer to date structure
  31.                 mov     es:[di],cx      ; load year
  32.                 mov     es:[di+2],dh    ; load month
  33.                 mov     es:[di+3],dl    ; load day
  34.         ELSE                            ; small model
  35.                 mov     di,arg3         ; pointer to date structure
  36.                 mov     [di],cx         ; load year
  37.                 mov     [di+2],dh       ; load month
  38.                 mov     [di+3],dl       ; load day
  39.         ENDIF
  40. FINISH:
  41.                 ret
  42. CASGetEventDate          endp
  43.  
  44.                 END
  45.  
  46.  
  47.